package Entity;

import java.io.Serializable;

import javax.persistence.*;

import java.util.ArrayList;
import java.util.List;


/**
 * The persistent class for the user database table.
 * 
 */
@Entity
@NamedQuery(name="User.findAll", query="SELECT u FROM User u")
public class User implements Serializable {
	@Override
	public String toString() {
		return id + ":" + name;
	}

	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	private String name;

	private String password;

	private String type;



	//bi-directional many-to-many association to PcrTube
	@ManyToMany(mappedBy="users",fetch=FetchType.EAGER)

	private List<PcrTube> pcrTubes=new ArrayList<PcrTube>();

	public User() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<PcrTube> getPcrTubes() {
		return this.pcrTubes;
	}

	public void setPcrTubes(List<PcrTube> pcrTubes) {
		this.pcrTubes = pcrTubes;
	}



}